home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-02-24 | 8.4 KB | 216 lines | [TEXT/MPS ] |
- Directory of Files on the MacsBug Book Disk
- -------------------------------------------
- Debugger Prefs sources Folder Contains the sources and tools to build the Debugger Prefs file
- Put in System Folder Folder Contains MacsBug files and the Programmer's Key INIT
- Sample Application Sources Folder Contains the sources to the sample applications
- Sample Applications Folder Contains the sample applications that go with some chapters in the book
- Utilities
- Mr. Bus Error Folder An INIT that help detects uses of null pointers. Can be placed in the System Folder
- About Programmer's Key File Description of Programmer's Key INIT
- MakeTemplates File An MPW script that will convert Pascal sources (usually INCLUDE files) into MacsBug Templates
- Read Me File This file
-
- __________________________________________________________________
-
- The rest of this file describes additions and changes to the disk enclosed
- with the MacsBug book.
-
-
- MakeTemplates Tool
- ------------------
-
- Included in the Utilties folder on the MacsBug book disk is an
- MPW script that will take Pascal include files (like those shipped
- with MPW) and turn the records and procedure parameters into
- MacsBug templates. These can then be used for examining data structures
- and parameters on the stack.
-
- To use the tool, place it in your MPW scripts folder and then give
- the command MakeTemplate followed by the file you want to create
- templates from. For example, to make QuickDraw templates, you would
- say:
-
- MakeTemplates "{PInterfaces}"QuickDraw.p
-
- When the script is done, you will have the source to the templates
- left on your worksheet. These may be copied into the Prefs.r file
- in the Debugger Prefs sources folder. If you then rebuild the Debugger
- Prefs file, the templates will be available. Or you can use the
- method for building templates with MPW described in Chapter 19.
-
- You may want to place your prefs in a separate template resource so
- that they may easily be moved or removed as desired.
-
- You can also convert your own header files to make debugging your
- code easier.
-
- __________________________________________________________________
-
- BigEasy Application Shell
- -------------------------
-
- BigEasy is an application shell that can be used wiht LightSpeed C or MPW. It was
- originally written by David Van Brink. We used it to create the various sample
- applications on the disk. To build the sample applications yourself, you will
- have to copy the files from the BigEasy folder into the folder with the sample
- application source. This is the directory structure the LightSpeed C projects
- or the MPW makefile expects.
-
- __________________________________________________________________
-
- There have also been some updates to MacsBug since the book was
- submitted for printing. The rest of this file is from Apple
- Computer describing those changes. In addition to this file from
- Apple, there is a known bug in the parsing of multiple commands on
- one line. To see the effect, try the command line of:
- 3;4
- and you will see that 3=$00000003 and also that 3=$00000004. This bug is just
- an output bug. Internally MacsBug is fine. MacsBug 6.2 also includes a double colon
- operator. A single colon, :, specifies the start of the procedure the PC is in,
- and a double colon, ::, specifies the start of the procedure that was in effect
- during the last IL command. Finally, even though the text below specifies that the
- DCMDs can't be created with MPW 3.2, we supply a Prefs32.make file that does
- just that.
-
- You may also notice some cosmetic differences between the listings in
- the book and those displayed by MacsBug 6.2. These are the result of
- last minute changes to MacsBug and are detailed in the following section.
- __________________________________________________________________
-
- MacsBug 6.2 1/25/91 © Apple Computer, Inc. 1981-91
-
- You should use the “Debugger Prefs” included with this MacsBug.
- It contains macros, templates, dcmds, and the C++ name unmangler.
- You may add your own resources to “Debugger Prefs”,
- or remove some to decrease memory usage.
-
- =================================================
-
- New features since 6.1
-
- MacsBug 6.2 supports the Macintosh Plus and all newer
- Macintosh models. These are the Macintosh Plus, SE, II, IIx,
- IIcx, SE30, Portable, IIci, IIfx, Classic, IIsi and LC.
-
- MacsBug 6.2 works reliably with all Apple monitors and all
- third-party monitors if their slot ROM and driver software
- have been designed according to the guidelines presented
- in Designing Cards and Drivers for the Macintosh II and
- Macintosh SE, with and without 32 bit QuickDraw.
-
- MacsBug 6.2 runs under A/UX 2.0.
-
- Typing Command-D instead of Command-; with an international
- keyboard accesses the symbol list.
-
- If the selected symbol in the scrollable list contains a
- C++ or Object Pascal class name, then pressing the tab key
- qualifies the list by that name.
-
- MacsBug 6.2 displays the name of the current application,
- the memory management scheme (24 bit/32 bit) currently used,
- and whether you are running and have access to virtual memory.
-
- New options for the Find command allow you to specify the width
- of the pattern for which MacsBug searches. One of these options
- allows MacsBug to look for 24 bit pointers.
-
- The heap dump display is more detailed and works with 24 bit
- and 32 bit heaps.
-
- An extension to the GT command allows you to specify
- one or more MacsBug commands to be executed
- once the specified breakpoint is reached.
-
- Beginning with MacsBug 6.1 (but not documented),
- the DebugStr trap was extended so that you could include
- one or more commands in the message string to DebugStr.
- After MacsBug is invoked by the DebugStr trap, in addition
- to displaying a message specified with DebugStr, MacsBug
- executes the command(s) included in the message for DebugStr.
- The syntax for the call is as follows:
-
- DebugStr ("string [; cmd]")
- string is the message to display.
- cmd is a MacsBug command or macro.
-
- Example:
-
- DebugStr ("Checking the heap ;hc ;g")
-
- This routine invokes MacsBug, display the message "Checking
- the Heap", does a heap check, and resumes execution of the
- program.
-
- The printf dcmd included in “Debugger Prefs” allows you to
- produce formatted output.
-
- =================================================
-
- Changes after the 6.2 release notes went final
-
- The 'mxbh' help resource now resides in the “MacsBug” file
- of MacsBug 6.2.
-
- SC6, SC7, and HZ take optional parameters. More information on
- these parameters can be obtained from the help command.
-
- The SC commands allow to crawl stacks anywhere in the memory.
- HZ knows about embedded, 24 bit, and 32 bit heaps.
- HX allows to switch to partially damaged heaps.
- HD knows a new Q option and displays an additional summary line.
-
- HZ and HD display partially damaged blocks and heaps with ! or ?
- next to the address.
-
- If an address is in a known resource but not in a known
- procedure then an artificial symbol may be displayed by MacsBug.
- E.g. 'CODE 0006 0C20 Pickers'+0262 indicates the address which
- is $262 bytes offset into CODE 6 resource, named "Pickers", of
- file $0C20.
-
- =================================================
-
- We know about some bugs :
-
- If ATR is on and A0 points into hardware registers on some
- NuBus cards then reading the bytes which A0 points to may
- cause the card to perform erratically (e.g. video flickering,
- network malfunction).
- For now try to use ATT instead in such situations.
-
- Sometimes MacsBug loses FPU status when an NMI interrupts
- two consecutive FPU instructions.
- If you encounter this use _DebugStr instead of hitting the NMI.
-
- There are still problems with a few video cards and video
- drivers.
- For now if you have more than one screen try to run MacsBug
- on the other screen.
-
- If you use a pre-release of System 7.0 and switch VM on then
- use common sense to avoid :
- - using the MacsBug Find command over NuBus card memory
- - searching for symbols in memory that is swapped to disk
- (you may want to consider using the SX command)
-
- ATHC sometimes reports an invalid heap if the Memory Manager
- calls _BlockMove while the heap zone free bytes are not yet
- adjusted.
- For now ignore these warnings or use ATHCA.
-
- The source code provided for dcmds requires MPW 3.1 to build
- the dcmds. It currently does not build with MPW 3.2.
- This does not affect the execution of the dcmds included in
- the file “Debugger Prefs”.
-
- =================================================
-
- In addition to these specific changes,
- you should find MacsBug 6.2 easier to use.
-
- Whenever possible its output has been made more articulate
- and its displays more intelligible.
-
- Feedback is an important and appreciated contribution.
-